package interpreter.debugger.ui;

/**
 * Shows overview over all commands
 *
 * @author Kris Selbekk
 */
public class HelpCommand extends Command {

    // Does not _DO_ anything, just prints
    public void exec( String[] args ) {
        args = null;
    }
    
    public void print() {
        // Prints list of all commands available
        StringBuilder out = new StringBuilder();
        
        out.append( "Available commands:\n" );
        out.append( "-------------------\n" );
        out.append( "setb <line#>\tSet breakpoint\n" );
        out.append( "clb <line#> \tClear breakpoint\n" );
        out.append( "src \t\tShow full source\n");
        out.append( "si  \t\tStep into function\n");
        out.append( "so  \t\tStep over\n");
        out.append( "sout\t\tStep out of function\n");
        out.append( "func\t\tShow current function source\n");
        out.append( "vars\t\tDisplay current local variables\n" );
        out.append( "c   \t\tContinue execution\n" );
        out.append( "listb       \tList active breakpoints\n" );
        out.append( "quit\t\tQuit execution\n" );
        out.append( "?   \t\tShows this menu\n-\n" );
        out.append( "What do you want to do? ");

        System.out.println(out.toString());
    }
}
